#!/bin/bash
set +e
ROOT="$HOME/Grok Main Brain/trading-complex/lean-service"
[[ -f "$ROOT/heal_installer_access.sh" ]] || ROOT="$(cd "$(dirname "$0")/../../../.." && pwd)"
bash "$ROOT/heal_installer_access.sh"
osascript -e 'display notification "Installers healed — try Boot / EVERYTHING again" with title "Fort Knox"' 2>/dev/null || true
# Also run boot install automatically after heal
if [[ -f "$ROOT/desktop/Install_Fort_Knox_Boot.command" ]]; then
  osascript <<OSA
tell application "Terminal"
  activate
  do script "bash \"$ROOT/heal_installer_access.sh\"; bash \"$ROOT/desktop/Install_Fort_Knox_Boot.command\"; echo; echo Boot install finished.; exit"
end tell
OSA
fi
